<?php
/**
 * Dizkus
 *
 * @copyright (c) 2001-now, Dizkus Development Team
 * @link http://www.dizkus.com
 * @version $Id: pnaccountapi.php,v 1.1 2010/08/26 10:45:24 parinya Exp $
 * @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
 * @package Dizkus
 */

/**
 * Return an array of items to show in the your account panel
 *
 * @params   uname   string   the user name
 * @return   array   array of items, or false on failure
 */
function HotelBooking_accountapi_getall($args)
{
    $dom = ZLanguage::getModuleDomain('HotelBooking');

    $items = array();
	
    $uname = isset($args['uname']) ? $args['uname'] : null;
    if (!$uname && pnUserloggedIn()) {
        $uname = pnUserGetVar('uname');
    }

    // Create an array of links to return
    if(SecurityUtil::checkPermission('HotelBooking::', '::', ACCESS_OVERVIEW)) {
        pnModLangLoad('HotelBooking', 'user'); 
        $items = array(array('url'		=> pnmodurl('HotelBooking','user','list',array('ctrl'=>'my_topics','user_id'=>$user_id)),
                         	 'module' => 'HotelBooking',
                             'title'   => __('My Topics'),
                             'icon'    => 'document_copies.png'),
					   array('url'		=> pnmodurl('HotelBooking','user','form',array('ctrl'=>'topics')),
                         	 'module' => 'HotelBooking',
                             'title'   => __('New Topic'),
                             'icon'    => 'document_prepare.png'),
					   array('url'		=> pnmodurl('HotelBooking','user','list',array('ctrl'=>'favourite')),
                         	 'module' => 'HotelBooking',
                             'title'   => __('My Favourite'),
                             'icon'    => 'star_big.png'));
    }
    return $items;
}
